#ifndef __LINKLIST_H__
#define __LINKLIST_H__

typedef void Cyclelist;
#define null NULL

typedef struct _tag_cyclelistNode
{
    struct _tag_cyclelistNode *next;
} CyclelistNode;

typedef struct _tag_Cyclelist
{
    CyclelistNode header;
    CyclelistNode *slider;
    int length;
} TCyclelist;

typedef struct __func_cyclelist
{
    Cyclelist *(*create)(void);
    int (*destory)(Cyclelist **list);
    int (*clear)(Cyclelist *list);
    int (*length)(Cyclelist *list);
    int (*insert)(Cyclelist *list, CyclelistNode *node, int pos);
    CyclelistNode *(*get)(Cyclelist *list, int pos);
    CyclelistNode *(*delete)(Cyclelist *list, int pos);
    CyclelistNode *(*deleteNode)(Cyclelist *list, CyclelistNode *node);
    CyclelistNode *(*reset)(Cyclelist *list);
    CyclelistNode *(*current)(Cyclelist *list);
    CyclelistNode *(*next)(Cyclelist *list);
} func_cyclelist;

#endif
